package com.lagou.edu.ad.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lagou.edu.ad.entity.PromotionAd;
import com.lagou.edu.ad.mapper.PromotionAdMapper;
import com.lagou.edu.ad.service.IPromotionAdService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @author lm
 * @since 2021/10/14 17:49
 */
@Service
public class PromotionAdServiceImpl extends ServiceImpl<PromotionAdMapper, PromotionAd> implements IPromotionAdService {
    @Override
    public List<PromotionAd> getPromotionAdBySpaceId(Integer id) {
        QueryWrapper<PromotionAd> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("spaceId", id);
        return this.getBaseMapper().selectList(queryWrapper);
    }
}
